<template>
  <!-- 预警报警-->
  <!-- 子页面——内容详情-->
  <view class="conter">
    <view class="Completion" >
      <!-- 一 -->
      <view class="Task_information">
        <view class="box_a">
          <view class="box_color">
          </view>
          <view class="box_word">
            详情内容
          </view>
        </view>
        <view class="box_b">
          <view class="box_name">
            企业名称：
          </view>
          <view class="box_name_a">
            {{esrlyList.groupName}}
          </view>
        </view>
        <view class="box_b">
         <view class="box_name">
            超标因子：
         </view>
         <view class="box_name_a">
            {{esrlyList.hj212Code}}
         </view>
        </view>
        <view class="box_b">
         <view class="box_name">
            超标浓度：
         </view>
         <view class="box_name_a">
            {{esrlyList.value}}{{esrlyList.unit}}
         </view>
        </view>
        <view class="box_b">
         <view class="box_name">
            超标时间：
         </view>
         <view class="box_name_a">
            {{esrlyList.time}}
         </view>
        </view>
      </view>
      <!-- 二 -->
      <!-- <view class="Task_information">
        <view class="box_a">
          <view class="box_color">
          </view>
          <view class="box_word">
            预警内容
          </view>
        </view>
        <view class="task_content">
         {{esrlyList.content}}
        </view>
      </view> -->
      <!-- 三 -->
   <!--   <view class="Task_information">
        <view class="box_a">
          <view class="box_color">
          </view>
          <view class="box_word">
            任务附件
          </view>
        </view>
        <view class="download" @click="download(item)" v-for="(item,i) in esrlyList.files" :key='i'>
          {{item.name}}
        </view>
        <view class="btn_delete">
          预览
        </view>
        <view class="btn_upload">
          下载
        </view>
      </view> -->
      <view class="foot_btn" @click="implement">
        去执行
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        reason: '',
        esrlyList: '',
        flag:0,
        flag_a:false,
      };
    },
    onLoad() {
      this.esrlyList = uni.getStorageSync('esrlyList')
      console.log('1234', this.esrlyList)
    },
    methods: {
      implement(){
         // uni.setStorageSync('esrlyList',this.esrlyList)
         uni.navigateTo({
             url: '../Alarm_handling/Alarm_handling?id='+this.esrlyList.id
         });
      },
      // download(e) {
      //   plus.runtime.openURL('http://47.114.111.108:8766/envirnment-basic'+e.path);
      //   // plus.runtime.openURL('http://47.114.111.108:8766/envirnment-basic/pub/download/task/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20210409133828.png');
      //   // console.log(e)
      // }
    }
  }
</script>

<style lang="scss">
  .conter {
    height: 100vh;
    background-color: #F7F7F7;
    // overflow: hidden;
  }

  .navigation_head {
    height: calc(88rpx + var(--status-bar-height));
  }

 
  .download {
    font-size: 28rpx;
    font-family: PingFang-SC-Medium, PingFang-SC;
    font-weight: 500;
    color: #333333;
    margin: 20rpx 0 0;
  }

  
  .Completion {
    // height: 100vh;
    background: #F7F7F7;
    overflow: hidden;
  }
  
  .Task_information {
    position: relative;
    width: 662rpx;
    margin: 20rpx auto;
    border-radius: 8rpx;
    padding: 20rpx;
    background-color: #FFFFFF;
  }
  
  .box_a {
    display: flex;
    align-items: center;
  }
  
  .box_color {
    width: 14rpx;
    height: 28rpx;
    margin-right: 12rpx;
    background: #4EA1FF;
    opacity: 1;
  }
  
  .box_word {
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: bold;
    color: #7A8AAA;
  }
  .task_content{
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    line-height: 48rpx;
    color: #475368;
  }
  .box_b {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100rpx;
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #94A5C7;
    border-bottom: 1rpx solid rgba(148, 165, 199, 0.1);
  }
  
  // .box_b:last-child {
  //   border: none;
  // }
  .box_bb {
    width: 100%;
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #94A5C7;
  }
  .box_name_a{
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #475368;
  }
  .JTxtArea {
    background-color: #FFFFFF;
    border-radius: 5rpx;
    width: calc(100% - 16rpx);
    // box-sizing: border-box;
    padding: 12rpx 12rpx 15rpx;
    min-height: 60rpx;
    line-height: 40rpx;
    color: #000000;
    position: relative;
  
    &.sm {
      min-height: 30rpx;
    }
  
    &.lg {
      min-height: 200rpx;
    }
  
    &:after {
      content: attr(data-maxnum);
      position: absolute;
      right: 5rpx;
      bottom: 0rpx;
      font-size: 30rpx;
      color: #999999;
    }
  }
  .upload{
    font-size: 28rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #94A5C7;
    margin-top: 40rpx;
  }
  .btn_delete{
    position: absolute;
   top: 20rpx;
    right: 150rpx;
    width: 90rpx;
    height: 36rpx;
    font-size: 24rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #4EA1FF;
    background: #FFFFFF;
    opacity: 1;
    text-align: center;
    border: 1rpx solid #4EA1FF;
    border-radius: 4rpx;
    } 
    .btn_upload{
    position: absolute;
    top: 20rpx;
    right: 36rpx;
    width: 90rpx;
    height: 36rpx;
    font-size: 24rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #FFFFFF;
    background: #4EA1FF;
    opacity: 1;
    text-align: center;
    border-radius: 4rpx;
    }
    .foot_btn{
      position: fixed;
      bottom: 20rpx;
      left: 24rpx;
      width: 702rpx;
      height: 80rpx;
      line-height: 80rpx;
      font-size: 28rpx;
      margin: 0 auto;
      font-family: Source Han Sans CN;
      font-weight: 400;
      text-align: center;
      color: #FFFFFF;
      background: #4EA1FF;
      opacity: 1;
      border-radius: 4rpx;
    }
</style>
